package com.example.quarkus.resource;

import com.example.quarkus.entity.Org;
import com.example.quarkus.service.OrgService;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import org.jboss.logging.Logger;
import org.jboss.resteasy.annotations.jaxrs.PathParam;

@Path("/org")
@Produces(MediaType.APPLICATION_JSON)
public class OrgResource {
    private static final Logger LOGGER = Logger.getLogger(OrgResource.class.getName());
    @Inject
    OrgService orgService;

    @Path("/orgInfo/{id}")
    @GET
    public Org getOrgInfo(@PathParam int id) {
        return orgService.getOrgById(id);
    }
}